package com.carol.lmsbe.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carol.lmsbe.dto.*;

import java.util.List;

/**
 * 设备借用服务接口
 */
public interface EquipmentBorrowService {

    /**
     * 分页查询设备借用记录
     */
    Page<EquipmentBorrowDTO> listBorrowRecords(EquipmentBorrowQueryRequest request);

    /**
     * 根据ID获取借用记录详情
     */
    EquipmentBorrowDTO getBorrowRecordById(Long id);

    /**
     * 申请借用设备
     */
    EquipmentBorrowDTO borrowEquipment(EquipmentBorrowRequest request);

    /**
     * 归还设备
     */
    EquipmentBorrowDTO returnEquipment(EquipmentBorrowReturnRequest request);

    /**
     * 更新借用记录
     */
    EquipmentBorrowDTO updateBorrowRecord(EquipmentBorrowUpdateRequest request);

    /**
     * 删除借用记录
     */
    void deleteBorrowRecord(Long id);

    /**
     * 审批借用申请
     */
    EquipmentBorrowDTO approveBorrowApplication(EquipmentBorrowApprovalRequest request);

    /**
     * 审批归还申请
     */
    EquipmentBorrowDTO approveReturnApplication(EquipmentBorrowReturnApprovalRequest request);

    /**
     * 获取我的借用记录
     */
    Page<EquipmentBorrowDTO> getMyBorrowRecords(EquipmentBorrowQueryRequest request);

    /**
     * 获取待审批借用申请
     */
    Page<EquipmentBorrowDTO> getPendingBorrowApplications(EquipmentBorrowQueryRequest request);

    /**
     * 获取待审批归还申请
     */
    Page<EquipmentBorrowDTO> getPendingReturnApplications(EquipmentBorrowQueryRequest request);

    /**
     * 批量删除借用记录
     */
    void batchDeleteBorrowRecords(List<Long> ids);

    /**
     * 导出借用数据
     */
    byte[] exportBorrowData(EquipmentBorrowQueryRequest request);
}
